package com.situ.blog.service.impl;

import com.situ.blog.mapper.BlogMapper;
import com.situ.blog.pojo.Blog;
import com.situ.blog.service.IBlogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class BlogServiceImpl implements IBlogService {
    @Autowired
    private BlogMapper blogMapper;

    @Override
    public List<Blog> selectAll() {
        return blogMapper.selectAll();
    }

    @Override
    public Blog selectById(Integer id) {
        return blogMapper.selectById(id);
    }

    @Override
    public void incrementClickCount(Integer id) {
        blogMapper.incrementClickCount(id);
    }

    @Override
    public List<Blog> selectHotList() {
        return blogMapper.selectHotList();
    }
}
